package com.asset.dispoal.defaultMenuCompany;

import com.asset.dispoal.defaultCompanyMenu.api.GbMenuCompanyService;
import com.asset.dispoal.defaultCompanyMenu.dto.GbMenuCompanyRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.mhuang.pacebox.springboot.protocol.Result;

import java.util.List;

/**
 * @author qr
 * @date 2022/3/14$
 */
@RestController
@RequestMapping("gb/defaultMenuCompany")
@Api(value = "默认公司菜单管理", tags = "默认公司菜单管理")
public class DefaultMenuCompanyController {

    @Autowired
    GbMenuCompanyService gbMenuCompanyService;

    @PostMapping(value = "/modify")
    @ApiOperation(value = "设置公司菜单", notes = "设置公司菜单")
    public Result modify(@RequestBody List<GbMenuCompanyRequest> gbMenuCompanyRequest) {
        gbMenuCompanyService.modifyMenuCompany(gbMenuCompanyRequest);
        return Result.ok();
    }
}
